﻿
Partial Class About
    Inherits CPage

    Protected Overrides Sub PageInit()
        litAboutText.Text = CSetting.AboutTextBrWithLink
        If CSetting.AboutImage.Length > 0 Then
            img.Src = CSitemap.SettingUploads & CSetting.AboutImage
        End If


        MetaKeywords = CSetting.MetaKeywords_About
        MetaDescription = CSetting.MetaDescription_About


        If CWeb.RequestBool("csv") Then
            CDataSrc.ExportToCsv(Response, "Sermons.csv")
            CDataSrc.ExportToCsv(Response, New String() {"Date", "Speaker", "Title"})

            Dim data As New List(Of String)(4)
            For Each p As CProduct In CProduct.Cache.Sermons.HavingMp3.SortByCreatedName
                If p.ProductLocationId <> ELocation.Baycity Then Continue For
                data.Clear()
                data.Add(p.DateString)
                data.Add(p.SpeakerName)
                data.Add(CUtilities.Truncate(p.ProductName, 80))
                'data.Add(CUtilities.Truncate(i.Product.LocationName))
                CDataSrc.ExportToCsv(Response, data.ToArray)
            Next
            Response.End()
        End If
    End Sub

End Class
